package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.ZxBxMingxi;
import cn.stylefeng.guns.sys.modular.system.model.params.ZxBxMingxiParam;
import cn.stylefeng.guns.sys.modular.system.model.result.SelectResult;
import cn.stylefeng.guns.sys.modular.system.model.result.ZxChengbenMingxiResult;
import cn.stylefeng.guns.sys.modular.system.model.result.ZxChengbenResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author modular/system
 * @since 2020-11-19
 */
public interface ZxBxMingxiMapper extends BaseMapper<ZxBxMingxi> {

    /**
     * 获取列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    List<ZxChengbenMingxiResult> customList(@Param("paramCondition") ZxBxMingxiParam paramCondition);

    /**
     * 获取map列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ZxBxMingxiParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    Page<ZxChengbenMingxiResult> customPageList(@Param("page") Page page, @Param("paramCondition") ZxBxMingxiParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ZxBxMingxiParam paramCondition);

    BigDecimal calculateChengbenJine(@Param("btyZxChengbenId") Long btyZxChengbenId);

    List<ZxChengbenMingxiResult> selectAllMingXiUnderLevel(@Param("paramCondition") ZxBxMingxiParam param);

    List<ZxChengbenMingxiResult> selectAllMingXiAndKemuInfo();

    List<SelectResult> queryCreateUser();

    void updateKemuByHuopinId(@Param("btyZxHuopinId") String btyZxHuopinId, @Param("status") String status);

    void updateKemuByHuopin();
    void updateStatusNull();

    //IPage tzqkMingXiList(@Param("page") Page page, @Param("paramCondition") ZxChengbenMingxiParam paramCondition);

    void updateBySpec(@Param("param") ZxBxMingxiParam param);

    List<Map<String, Object>> listMingxiDetail(@Param("param") ZxBxMingxiParam param);

    List<ZxChengbenMingxiResult>mergeDetail(@Param("btyZxChengbenId") Long btyZxChengbenId);

    void tongbuKemu(@Param("huopin_id") String huopin_id);

    List<ZxBxMingxiParam> queryBxqk(@Param("userId") Long userId, @Param("btyZxMdzxId") Long btyZxMdzxId, @Param("huopinId") String huopinId);

    void updateMingxi(@Param("param") ZxBxMingxi zxBxMingxi);
}






